' ****** START INCLUDE RgbaPset(x%,y%,c&,a%b):::PUTSTRING(x%, y%, s$) ****** SUB RgbaPset(x%,y%,c&,a%b) dim c$, r0%, g0%, b0%, r1%, g1%, b1%, a0% c$ = RIGHT$("000000" + HEX$(POINT(x%,y%)), 6) r0% = VAL("0x" + LEFT$(c$,2)) g0% = VAL("0x" + MID$(c$,3,2)) b0% = VAL("0x" + RIGHT$(c$,2)) c$ = RIGHT$("000000" + HEX$(c&), 6) r1% = VAL("0x" + LEFT$(c$,2)) g1% = VAL("0x" + MID$(c$,3,2)) b1% = VAL("0x" + RIGHT$(c$,2)) a0% = 255 - a%b PSET(x%,y%), _RGB( [{ (r0%*a0%)+(r1%*a%b) }/255], _ [{ (g0%*a0%)+(g1%*a%b) }/255], _ [{ (b0%*a0%)+(b1%*a%b) }/255] ) END SUB SUB PUTSTRING(x%, y%, s$) FOR c = 1 TO LEN(s$) sc$ = MID$(s$, c, 1) this$ = _GETCHR$(ASC(sc$)) FOR yi = 0 TO 7 FOR xi = 0 TO 7 x_pset% = x% + xi + (c-1)*8 : y_pset% = y% + yi IF MID$(this$, (xi + yi*8) + 1, 1) = "X" AND BETWEEN(x_pset%, 0, _WIDTH-1) AND BETWEEN(y_pset%, 0, _HEIGHT-1) THEN PSET (x_pset%, y_pset%) NEXT xi NEXT yi NEXT c END SUB ' ****** END INCLUDE RgbaPset(x%,y%,c&,a%b):::PUTSTRING(x%, y%, s$) ****** SCREEN _NEWIMAGE(141, 51, 32) Sub RgbaLine (x1%, y1%, x2%, y2%, c&, a%b) xd% = ABS(x2% - x1%) yd% = ABS(y2% - y1%) IF xd% = 0 THEN FOR i = MIN(y1%,y2%) to MAX(y1%,y2%): RgbaPset(x1%, i, c&, a%b) : NEXT i ELSE m# = yd%/xd% c# = y2% - x2% * m# : IF c# = 0 THEN c# = y1% - x1% * m# IF xd% >= yd% THEN FOR i = MIN(x1%,x2%) to MAX(x1%,x2%): RgbaPset(i, m# * i + c#, c&, a%b) : NEXT i IF xd% < yd% THEN FOR i = MIN(y1%, y2%) to MAX(y1%,y2%): RgbaPset((i - c#)/m#, i, c&, a%b) : NEXT i END IF End Sub FOR X = 140 TO 0 step -1 RgbaLine (X,0,X,25, _RGB(0,255,255), 255) NEXT X FOR X = 0 TO 140 RgbaLine (X,0,X,50, _RGB(255,255,255), 255-X) NEXT X FOR X = 0 TO 140 RgbaLine (X,20,X,30, _RGB(255,255,0), 100) NEXT X COLOR _RGB(0,0,0) PUTSTRING (0,10, "ROCK AND ROLL !!!")